#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
yarn workspace @theatre/dataverse run precommit

# if there are unstaged changes in ./packages/dataverse/docs, fail
if ! git diff --quiet --exit-code -- docs; then
  echo "Please run 'yarn workspace @theatre/dataverse run doc' and commit the changes to the docs folder"
  exit 1
fi
